package net.yxsoft.bean;

import rapid.util.StrKit;

/**
 * @author zhaohaibo
 */
public class WeChatLoginDetail {

  private String signature;
  private String encryptedData;
  private String iv;
  private String rawData;
  private String errMsg;
  private WeChatLoginDetailUser userInfo;

  public String getSignature() {
    return signature;
  }

  public void setSignature(String signature) {
    this.signature = signature;
  }

  public String getEncryptedData() {
    return encryptedData;
  }

  public void setEncryptedData(String encryptedData) {
    this.encryptedData = encryptedData;
  }

  public String getIv() {
    return iv;
  }

  public void setIv(String iv) {
    this.iv = iv;
  }

  public String getRawData() {
    return rawData;
  }

  public void setRawData(String rawData) {
    this.rawData = rawData;
  }

  public String getErrMsg() {
    return errMsg;
  }

  public void setErrMsg(String errMsg) {
    this.errMsg = errMsg;
  }

  public WeChatLoginDetailUser getUserInfo() {
    return userInfo;
  }

  public void setUserInfo(WeChatLoginDetailUser userInfo) {
    this.userInfo = userInfo;
  }

  public boolean isValid() {
    if(StrKit.isEmpty(signature) || StrKit.isEmpty(encryptedData) || StrKit.isEmpty(rawData)) {
      return false;
    }

    return true;
  }
}
